
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
    function foo1(){
        return {
            bar:"hello"
            };
    }
    function f002(){
        return 
        {
            bar:"hello"
        };
    }
    console.log(foo1());//{bar:"hello"}
    console.log(foo2());//Uncaught ReferenceError: foo2 is not defined
    // 考察的是return后面是否换行，return后面如果换行，则会把return当做一个语句执行，自动在后面填上;分号，剩下的不会执行了，如果return后面紧跟，跟着什么也打印什么
    </script>
</body>
</html>